package com.coocaa.ops.common.core.biz.globalparams.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.coocaa.ops.common.core.base.entity.BaseEntity;
import lombok.Data;

import java.util.List;
import java.util.Objects;

/**
 * @author : hql
 * @date : 2020/7/15 11:36
 * @description
 */
@Data
@TableName("global_params")
public class GlobalParamsEntity extends BaseEntity {

    /**
     * 业务分类定义说明
     */
    private String remark;

    private String name;

    /**
     * dict_info表id，dict_category为globalParams
     */
    private Integer type;

    /**
     * 说明
     */
    private String comment;

    /**
     * 是否开启
     */
    private Integer switchStatus;

    @TableField(exist = false)
    private List<GlobalParamsContentEntity> globalParamsContent;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        GlobalParamsEntity entity = (GlobalParamsEntity) o;
        return Objects.equals(entity.getId(), getId()) &&
                Objects.equals(entity.getName(), getName()) &&
                Objects.equals(entity.getComment(), getComment()) &&
                Objects.equals(entity.getRemark(), getRemark()) &&
                Objects.equals(entity.getSwitchStatus(), getSwitchStatus());
    }
}
